/**
 * 2027. 转换字符串的最少操作次数
 * @param {string} s
 * @return {number}
 */
// 模拟
var minimumMoves = function (s) {
	let covered = -1,
		res = 0
	for (let i = 0; i < s.length; i++) {
		if (s.charAt(i) == 'X' && i > covered) {
			res++
			covered = i + 2
		}
	}
	return res
}
const res = minimumMoves('XXOX')
console.log('minimumMoves :>>', res)
